    <div class="form">
        {assign var=form value=$this->beginWidget('CActiveForm', [
            'id'=>'login-form',
            'enableClientValidation'=>true,
            'clientOptions'=>[
                'validateOnSubmit'=>true
            ]
        ], true)}

        <p class="note">Fields with <span class="required">*</span> are required.</p>

        <div class="row">
            {$form->labelEx($model,'username')}
            {$form->textField($model,'username')}
            {$form->error($model,'username')}
        </div>

        <div class="row">
            {$form->labelEx($model,'password')}
            {$form->passwordField($model,'password')}
            {$form->error($model,'password')}
            <p class="hint">
                Hint: You may login with <tt>demo/demo</tt> or <tt>admin/admin</tt>.
            </p>
        </div>

        <div class="row rememberMe">
            {$form->checkBox($model,'rememberMe')}
            {$form->label($model,'rememberMe')}
            {$form->error($model,'rememberMe')}
        </div>

        <div class="row buttons">
            {CHtml::submitButton('Login')}
        </div>
    {assign var=form value=$this->endWidget()}
    </div><!-- form -->
     
